<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet/less" type="text/css" href="style.less" />
    <link rel="stylesheet" href="../common/css/coommon.css" />
  </head>
  <body>
    <div class="common zysp" id="app">
      <div class="card_01">
        <div class="qr-code">
          <img />
        </div>
        <p class="title">
          <span><img src="./img/icon01.png" />终验审批</span>
          <button class="button_primary">返回</button>
        </p>
        <ul class="desc">
          <li><span>项目名称</span>项目名称项目名称项目名称</li>
          <li><span>申请人</span>练清风</li>
          <li><span>申请时间</span>2023/01/12 13:24:56</li>
          <li style="align-items: flex-start">
            <span>审核人</span>
            <div>
              一级审核人：某某<br />
              二级审核人：某某<br />
              三级审核人：某某
            </div>
          </li>
          <li style="align-items: flex-start">
            <span>紧急程度</span>一般(B级)
          </li>
          <li style="align-items: flex-start">
            <span>项目金额</span>200000.00元
          </li>
          <li style="width: 100%">
            <span>审核批示</span>
            <div class="textarea-group">
              <textarea
                style="width: 56.4583vw"
                rows="4"
                placeholder="请输入..."
              ></textarea>
            </div>
          </li>
          <li style="width: 100%">
            <span>审核结果</span>
            <button class="button_success">通过</button>
            &ensp;&ensp;
            <button class="button_warning">不通过</button>
          </li>
        </ul>
      </div>
      <br />
      <div class="card_02">
        <p class="title">
          <span>附件材料</span>
        </p>
        <br />
        <div class="table">
          <div class="table-header">
            <div class="tr">
              <div class="td" style="width: 20%">文件类型</div>
              <div class="td center" style="width: 20%">是否必传</div>
              <div class="td center" style="width: 20%">上传人</div>
              <div class="td center" style="width: 20%">上传文件预览</div>
              <div class="td center" style="width: 20%">更新时间</div>
            </div>
          </div>
          <div class="table-body">
            <div class="tr" v-for="item in 5">
              <div class="td" style="width: 20%">终验报告</div>
              <div class="td center" style="width: 20%">是</div>
              <div class="td center" style="width: 20%">张三</div>
              <div class="td center" style="width: 20%">
                <button class="button_primary_text">总验报告.doc</button>
              </div>
              <div class="td center" style="width: 20%">
                2023-05-05 13:45:06
              </div>
            </div>
          </div>
          <div class="pageTotal">
            <div class="pagination">
              <span>共 {{total}} 条</span>
              <ul>
                <li @click="shang"><i class="bi bi-chevron-left"></i></li>
                <li
                  v-show="start > 0"
                  @click="()=>{
                      if(start > 0){
                        params.page = start;
                        end-=3
                        start-=3
                      }
                    }"
                >
                  ...
                </li>
                <li
                  @click="onCurrentPage(item)"
                  v-for="item in totalPage"
                  v-show="item < end && item > start"
                  :class="[item == params.page ? 'active' :'']"
                >
                  {{item}}
                </li>
                <li
                  v-show="end <= totalPage"
                  @click="()=>{
                      if(end <= totalPage){
                      params.page = end;
                      end+=3
                      start+=3
                      }
                    }"
                >
                  ...
                </li>
                <li @click="next"><i class="bi bi-chevron-right"></i></li>
              </ul>
            </div>
          </div>
        </div>
      </div>
      <br />
      <div class="card_03">
        <p class="title">
          <span>审批记录</span>
        </p>
        <ul class="desc">
          <li><span>审核时间</span>2023/04/01 14:23:45</li>
          <li><span>二级审核人</span>某某</li>
          <li>
            <span>审核结果</span>
            <a style="display: flex; align-items: center; color: #f53f3f"
              ><img style="margin-right: 3px" src="./img/icon02.png" />不通过
            </a>
          </li>
          <li style="width: 66%">
            <span>审核批示</span
            >阿迪睡觉啊是倒计时打卡是的撒开的哈萨克等哈阿迪睡觉啊是倒计时打卡是的撒开的哈萨克等哈阿迪睡觉啊是倒计时打卡是的撒开的哈萨克等哈
          </li>
          <li>
            <span>审核签名</span>
            <div class="sign-img"></div>
          </li>
        </ul>
        <hr />
        <ul class="desc">
          <li><span>审核时间</span>2023/04/01 14:23:45</li>
          <li><span>二级审核人</span>某某</li>
          <li>
            <span>审核结果</span>
            <a style="display: flex; align-items: center; color: #00b42a"
              ><img style="margin-right: 3px" src="./img/icon03.png" />通过
            </a>
          </li>
          <li style="width: 66%">
            <span>审核批示</span
            >阿迪睡觉啊是倒计时打卡是的撒开的哈萨克等哈阿迪睡觉啊是倒计时打卡是的撒开的哈萨克等哈阿迪睡觉啊是倒计时打卡是的撒开的哈萨克等哈
          </li>
          <li>
            <span>审核签名</span>
            <div class="sign-img"></div>
          </li>
        </ul>
      </div>
    </div>
  </body>
  <script src="./less.js"></script>
  <script src="../common/js/vue.js"></script>
  <script>
    const { createApp } = Vue;
    createApp({
      data() {
        return {
          total: 100,
          totalPage: 10,
          start: 0,
          end: 4,
          list: [],
          params: {
            page: 1,
            limit: 10,
          },
        };
      },
      //所有函数都写在这里
      methods: {
        // 列表状态切换
        statusChange(item, index) {
          this.statusActive = index;
        },
        shang() {
          if (this.params.page > 1) this.params.page--;
          if (this.params.page < this.start + 1) {
            this.end -= 3;
            this.start -= 3;
          }
          this.get();
        },
        next() {
          if (this.params.page < this.totalPage) this.params.page++;
          if (this.params.page > this.end - 1) {
            this.end += 3;
            this.start += 3;
          }
          this.get();
        },
        onCurrentPage(page) {
          this.params.page = page;
        },
        //接口
        get() {
          // ajax 请求
          // $.ajax()
          this.totalPage = 10; // 总页数
          this.total = 100; //总条数
          this.list = [
            {
              value: "吴恒",
            },
          ];
        },
      },
    }).mount("#app");
  </script>
</html>
